 
 // 站点列表
const siteList = {
    uri: '/institution-school-center/manage/institution/page',
    queries: {
        cityId: false,
        districtId: false,
        provinceId: false,
        institutionId: false,
        institutionLevel: false,
        institutionName: false,
        institutionState: false,
        institutionType: false,
        pageIndex: false,
        pageSize: false,
        createMaxTime: false,
        createMinTime: false,
        institutionAttribute: false,
        stageId: false,
        fetchBrand: false,
        version: false, // 睿云版本1.0:v1 睿云版本2.0:v2
        dtTenant: false
    },
    method: 'post',
    message: false,
    data: null,
    options: {
        allowDupRequest: true // 允许重复请求
        // requestFreezingTime: 10
    }
}

// 保存修改组织/站点信息
const institutionSave = {
    uri: '/institution-school-center/manage/institution/save',
    data: {
        address: false,
        cityId: false,
        districtId: false,
        provinceId: false,
        institutionLevel: false,
        institutionName: false,
        institutionType: false,
        stages: false,
        typeBindId: false,
        cityName: false,
        districtName: false,
        provinceName: false,
        institutionAttribute: false,
        customName: false,
        id: false,
        dtTenant: false,
        templateId: false,
        version: false

    },
    method: 'post',
    message: false,
    queries: null
}


// 删除组织
const manageInstitutionDelete = {
    uri: '/institution-school-center/manage/institution/delete',
    queries: {
        id: true
    },
    method: 'post',
    message: false,
    data: null
}

// 下挂备选组织列表(地区) 部分地区
const manageInstitutionAreas = {
    uri: '/institution-school-center/manage/institution/areas',
    data: {
        cityId: false,
        districtId: false,
        institutionName: false,
        provinceId: false
    },
    noHttpCache: true,
    method: 'post',
    message: false,
    queries: null
}

 // 获取所有顶级组织树
 const findTopInstitutionList = {
    uri: '/institution-school-center/institution/findTopInstitutionList',
    queries: {
        dtTenant: false,
        scene: false
    },
    message: false,
    method: 'get',
    data: null,
    options: {
        allowDupRequest: true
    }
}

 // 获取下级组织树
 const findSubInstitution = {
    uri: '/institution-school-center/manage/institution/sub/page',
    queries: {
        parentInstitutionId: false,
        pageIndex: false,
        pageSize: false
    },
    method: 'post',
    data: null,
    options: {
        allowDupRequest: true
    }
}

// 获取导入批次结果
const getImportVOList = {
    uri: '/institution-school-center/account/getImportVOList',
    queries: null,
    method: 'post',
    message: false,
    data: {
        fileName: false,
        institutionId: false,
        status: false,
        pageSize: false,
        pageIndex: false,
        createByName: false,
        beginGmtCreate: false,
        endGmtCreate: false,
        importItem: false
    },
    options: {
        allowDupRequest: true
    }
}

// 组织成员查询列表
const instutionMemberList = {
    uri: '/institution-school-center/member/list',
    data: {
        institutionId: false,
        memberId: true,
        name: false,
        pageIndex: false,
        pageSize: false,
        phone: false,
        positionType: false,
        role: false,
        stage: false,
        subject: false,
        eduId: false,
        memberState: false,
        roleCode: false,
        school: false,
        stageId: false,
        subjectId: false,
        startTime: false,
        endTime: false,
        dtTenant: false
    },
    method: 'post',
    queries: null,
    options: {
        allowDupRequest: true
    }
}

 // 获取组织详情信息
const getInstitutionInfo = {
    uri: '/institution-school-center/manage/institution/info',
    method: 'get',
    data: null,
    message: false,
    queries: {
        id: true // 组织id
    },
    options: {
        requestFreezingTime: 0
    }
}

// 保存组织站点关系(保存站点信息前先调用这个接口) 已弃用
const saveSiteRelationship = {
    uri: '/institution-school-center/manage/institution/brand/save',
    method: 'post',
    message: false,
    data: {
        id: true, // 组织id
        list: false, // 组织机构功能栏
        siteBrand: false, // 品牌key
        siteName: false // 导航站点名称
    },
    queries: null,
    options: {
        allowDupRequest: true
    }
}

// 站点模板列表
const templateList = {
    uri: '/institution-school-center/internal/app/portal/get/template/data',
    data: null,
    method: 'get',
    queries: null
}

// 站点配置信息
const getTemplateConfig = {
    uri: '/institution-school-center/internal/app/portal/get/config',
    data: null,
    method: 'get',
    queries: {
        institutionId: true, // 当前组织id
        componentType: true // 类型： navigation:导航栏, portalColumn:门户栏目
    },
    options: {
        allowDupRequest: true // 允许重复请求
    }
}
// 站点应用列表
const getSiteApplications = {
    uri: '/institution-school-center/inst/app/type/listByInstitutionId',
    data: null,
    method: 'get',
    queries: {
        institutionId: true // 当前组织id
    },
    options: {
        allowDupRequest: true // 允许重复请求
    }
}

// 保存站点导航/模板配置
const saveSiteConfig = {
    uri: '/institution-school-center/internal/app/portal/save/config/data',
    data: {
        client: 'pc', // 适用客户端, pc|app
        componentType: true,
        institutionId: false,
        id: false,
        configName: false,
        data: false,
        fromTemplateId: false
    },
    method: 'post',
    queries: null,
    options: {
        allowDupRequest: true // 允许重复请求
    }
}


// 机构、学校管理员查询列表 
const memberList = {
    uri: '/institution-school-center/member/manageList',
    data: {
        'institutionName': false,
        'sysUserId': false,
        'memnberState': false,
        'name': false,
        'pageIndex': false,
        'pageSize': false,
        'phone': false,
        'role': false
    },
    method: 'post',
    queries: null,
    options: {
        allowDupRequest: true
    }
}

// 删除用户
const memberDelete = {
    uri: '/institution-school-center/member/deleteMember',
    queries: {
        memberId: true
    },
    method: 'get',
    data: null
}
// 退出组织
const quietInstitution = {
    uri: '/institution-school-center/member/quietInstitution',
    queries: {
        memberId: true,
        institutionId: true
    },
    method: 'get',
    data: null
}

// 编辑用户，更新
const memberUpdate = {
    uri: '/institution-school-center/member/update',
    data: {
        institutionId: false,
        memberId: false,
        name: false,
        phone: false,
        positionType: false,
        stageSubjectGradeList: false
    },
    method: 'put',
    queries: null
}

// 编辑用户，保存
const memberSave = {
    uri: '/institution-school-center/member/save',
    data: {
        institutionId: false,
        memberId: false,
        name: false,
        phone: false,
        positionType: false,
        stageSubjectGradeList: false
    },
    method: 'post',
    queries: null
}

// 启用/停用
const enableAndDisableMember = {
    uri: '/institution-school-center/member/enableAndDisableMember',
    queries: {
        memberId: true,
        status: true // 状态：0停用 1启用
    },
    method: 'get',
    data: null,
    options: {
        allowDupRequest: true
    }
}
// 组织用户下的角色列表分页
const assignRoleList = {
    uri: '/institution-school-center/member/assignRoleListWest',
    queries: {
        institutionId: false,
        memberId: false,
        pageIndex: false,
        pageSize: false,
        keyword: false
    },
    method: 'get',
    data: null,
    options: {
        allowDupRequest: true
    }
}
// 获取用户已分配的角色列表
const getUserRoles = {
    uri: '/institution-school-center/member/getUserRoleList',
    queries: {
        institutionId: false,
        memberId: true
    },
    method: 'get',
    data: null,
    options: {
        allowDupRequest: true
    }
}

// 重置密码
const resetUserPwd = {
    uri: '/institution-school-center/member/changePassword',
    queries: null,
    method: 'post',
    data: {
        'clientId': false, // sanren-wand-pc
        'password': false,
        'userId': false
    }
}

// 分配组织用户角色
const assginUserRole = {
    uri: '/institution-school-center/member/assginRole',
    queries: null,
    method: 'post',
    data: {
        memberId: false,
        institutionRoleList: false
    }
}
// 批量给用户分配角色
const assginSomeUserRole = {
    uri: '/institution-school-center/role/assignUserToRole',
    queries: null,
    method: 'post',
    data: {
        institutionId: false,
        memberIds: false,
        roleCode: false
    }
}

// 授权管理-返回授权列表-超管页面
const getRoleListByManage = {
    uri: '/institution-school-center/member/getRoleListByManage',
    queries: {
        memberId: true,
        institutionId: false
    },
    method: 'get',
    data: null
}

// 查询用户是否是中台用户的接口
const getMiddleUserInfo = {
    uri: '/institution-school-center/wand/institutionMiddleUserRole/getMiddleUserInfo',
    queries: {
        userId: false
    },
    method: 'get',
    data: null
}

// 角色分页列表
const roleList = {
    uri: '/institution-school-center/role/pageList',
    queries: null,
    method: 'post',
    data: {
        pageIndex: false,
        pageSize: false,
        remarks: false,
        roleName: false,
        state: false 
    }
}

// 获取角色列表不分页
const roleAllList = {
    uri: '/institution-school-center/role/roleList',
    queries: {
        institutionType: false
    },
    method: 'get',
    data: null,
    noHttpCache: true
}


// 获取导入结果
const getImportVO = {
    uri: '/institution-school-center/account/getImportVO',
    data: null,
    method: 'get',
    queries: {
        importResultId: false
    },
    noHttpCache: true,
    options: {
        allowDupRequest: true
    }
}

// 导入教师账号
const importTeacherAccount = {
    uri: '/institution-school-center/account/importTeacherAccount',
    queries: null,
    method: 'post',
    data: {
        booleanImportAccount: false,
        fileName: false,
        importResultId: false,
        institutionId: false,
        uploadUrl: false
    }
}

// 组织导入
const importInstitutionImport = {
    uri: '/institution-school-center/import/institutionImport',
    queries: null,
    method: 'post',
    data: {
        booleanImportAccount: false,
        fileName: false,
        importResultId: false,
        institutionId: false,
        uploadUrl: false,
        version: false
    }
}
// 职位类型列表
const getPositionType = {
    uri: '/institution-school-center/position/getPositionTypeByInstitutionType',
    data: null,
    method: 'get',
    queries: {
        institutionType: false
    }
}
// 所有已创建组织的空间
const institutionTenants = {
    uri: '/institution-school-center/manage/institution/tenants',
    data: null,
    method: 'post',
    queries: null
}
// 根据手机号查询名字
const getNameByPhone = {
    uri: '/institution-school-center/member/getNameByPhone',
    data: null,
    method: 'get',
    queries: {
        phone: false,
        dtTenant: false
    }
}


export default {
    quietInstitution,
    getNameByPhone,
    institutionTenants,
    getPositionType,
    assginSomeUserRole,
    siteList,
    institutionSave,
    manageInstitutionDelete,
    manageInstitutionAreas,
    findTopInstitutionList,
    findSubInstitution,
    getImportVOList,
    instutionMemberList,
    getInstitutionInfo,
    saveSiteRelationship,
    templateList,
    getTemplateConfig,
    getSiteApplications,
    saveSiteConfig,
    memberList,
    memberDelete,
    memberUpdate,
    memberSave,
    enableAndDisableMember,
    assignRoleList,
    getUserRoles,
    resetUserPwd,
    assginUserRole,
    getRoleListByManage,
    getMiddleUserInfo,
    roleList,
    roleAllList,
    getImportVO,
    importTeacherAccount,
    importInstitutionImport

}

